#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#define NUM 101
void carry(int a[],int c){
	int tmp = a[c] + 1;
	if (tmp == 10){
		a[c] = 0;
		if (c==1){
			a[0] += 1;
		}
		else
		{
			carry(a, c - 1);
		}
	}
	else{
		a[c] = tmp;
	}
}
int xt2_5(){
	
	int count = 0;
	while (1)
	{
		int a[NUM] = { 0 };
		int n = 0, m = 0, c = 0;
		scanf("%d", &n);
		scanf("%d", &m);
		scanf("%d", &c);
		if (m == 0 && n == 0&&c==0){
			break;
		}
		count++;
		int ipt = n / m;
		a[0] = ipt;
		int rem = n%m;
		for (int i = 1; i <= c; i++){
			a[i]=rem*10/m;
			rem=rem * 10 % m;
		}
		if (rem * 10 / m >= 5){
			carry(a,c);
		}
		printf("Case %d:%d.",count,a[0]);
		for (int i = 1; i <= c;i++){
			printf("%d",a[i]);
		}
		printf("\n");
	}
	return 0;
}
/*
input:
1 6 4
999999 1000 2
0 0 0

output:
Case 1:0.1667
Case 2:1000.00
*/